import Vue from 'vue'
import Swiper from "./Swiper/Swiper";
import LiveShow from "./LiveShow/LiveShow";
import News from './News/News';
import {VImg} from 'vuetify/lib'
import { getShow,getShowAns } from '@/api/pic';
const Style = {
    backgroundColor: '#fff',
    backgroundImage: 'linear-gradient(-225deg, #E3FDF5 0%, #FFE6FA 100%)',
    minHeight: '100vh',
    padding: '3vh 4vw'
}

export default Vue.extend({
    name: 'Home',
    data: () => ({
        url: ''
    }),
    components: {
        Swiper,
        LiveShow,
        News,
        'v-img': VImg
    },
    mounted(){
        getShow()
            .then(res => {
                const {code,url} = res as unknown as getShowAns
                if(code === 200){
                    this.url = url
                }
            })
    },
    render() {
        return (
            <div>
                <Swiper />
                <div style={Style}>
                    <div style={{ marginBottom: '2vh'}}>
                        <v-img src={this.url}></v-img>
                    </div>
                    <hr />
                    <News />
                    <LiveShow />
                </div>

            </div>
        )
    }
})